<table width="100%" cellspacing="0" cellpadding="0">
  <?php if ($page_data[message] != '') { ?>
    <tr>
      <td align="center">
       <div class="gray_box" style="">
        <em><?php echo $page_data[message];?></em>
        </div>
      </td>
    </tr>
  <?php } // end if message ?>
  <!---------------- Begin Review Assignments section ------------------------------------------------------------------------->
  <tr>
    <td align="center">
      <div class="gray_box" style="">
        <div style="text-align:right;width:95%;">
          <input type="button" value="Add New Url" onclick="location.href='?task=add'"/>
        </div>
        <br />

        <table cellpadding="4" cellspacing="0" style="border: 1px solid #000000" width="97%">
          <tr>
            <th colspan="4">Review Pages</th>
          </tr>
          <tr>
           <td align="left" style="border-bottom: 1px solid #000000" width="10%">Id</td>
           <td align="left" style="border-bottom: 1px solid #000000" width="35%">Url</td>
           <td align="left" style="border-bottom: 1px solid #000000">Preview</td>
           <td align="left" style="border-bottom: 1px solid #000000">Action</td>
         </tr>
          <?php if (count($page_data[page]) <= 0) { ?>
           <tr>
              <td colspan="4"><em>There are currently no page extracted for review.</em></td>
           </tr>
          <?php } else { ?>

           <?php   while($page = mysql_fetch_array($page_data[page])) {?>

              <tr class="odd_row_css">
                <td align="left"><?php echo $page[page_id ];?></td>
                <td align="left" class="title">
                <a href="<?php echo $page[page_url];?>" target="_blank">
                 <?php echo $page[page_url];?>
                  </a>
                </td>

                <td align="left" class="actions"><a href="#" onclick="popwin5('../templates/html_content/preview.php?as=<?php echo $page[page_id ];?>')"  title="Preview">Preview</a></td>
                <td align="left" class="actions">
                <a href="?task=edit&editto=<?php echo $page[page_id ];?>">Edit</a>&nbsp;|&nbsp;<a onclick="return askFirstBeforeDelete('<?php echo $page[page_id ];?>');" href="#">Delete</a>
                </td>

              </tr>

             <?php } // end for each abstract ?>
           <?php } // end if assignments ?>
         </table>

         <br />
         <div style="text-align:right;width:95%;">
          <input type="button" value="Add New Url" onclick="location.href='?task=add'"/>
         </div>
       </div>
     </td>
   </tr>
</table>
<script>
function askFirstBeforeDelete(id)
{
 if(window.confirm("Are you sure you want to remove this page")){
  document.location.href = "?task=delete&del_id="+id;
  return true;
 }
 return false;
}
function popwin5(url) {
 win = window.open(url,"","height=600,width=1000,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no");

}
</script>